import { stringify } from "qs";
import request from "@/utils/request";

export async function listStaff(params) {
//   console.log(stringify(params));
  return request(`/api/account/accUser/?${stringify(params)}`);
}

export async function getStaff(params) {
  // console.log(stringify(params));
  return request(`/api/account/accUser/${params.id}`);
}

export async function createStaff(params) {
  return request("/api/account/accUser/create", {
    method: "POST",
    body: {
      ...params
    }
  });
}

export async function updateStaff(params) {
  return request("/api/account/accUser/update", {
    method: "POST",
    body: {
      ...params
    }
  });
}

export async function deleteStaff(params) {
  console.log(params.id)
  return request(`/api/account/accUser/delete/${params.id}`);
}
